<?php
abstract class Dmf_Form_Filter
{
    abstract function getValue( $value );
    
    public function __construct()
    {
        
    }
    
    public function allow( $chars, $value )
    {
        $newValue = '';
        $valParts = str_split( $value );
        
        foreach( $valParts as $valPart )
        {
            foreach( $chars as $char )
            {
                if ( $char == $valPart )
                {
                    $newValue .= $char;
                    continue;
                }
            }
        }
        
        return $newValue;
    }
}